<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Object Tracking</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Object Tracking<div class="ingroups"><a class="el" href="../../d7/de9/group__video.html">Video Analysis</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dde/classcv_1_1DenseOpticalFlow.html">cv::DenseOpticalFlow</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d4f/classcv_1_1DISOpticalFlow.html">cv::DISOpticalFlow</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">DIS optical flow algorithm.  <a href="../../de/d4f/classcv_1_1DISOpticalFlow.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d9e/classcv_1_1FarnebackOpticalFlow.html">cv::FarnebackOpticalFlow</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Class computing a dense optical flow using the Gunnar Farneback's algorithm.  <a href="../../de/d9e/classcv_1_1FarnebackOpticalFlow.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html">cv::KalmanFilter</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Kalman filter class.  <a href="../../dd/d6a/classcv_1_1KalmanFilter.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d14/classcv_1_1SparseOpticalFlow.html">cv::SparseOpticalFlow</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Base interface for sparse optical flow algorithms.  <a href="../../de/d14/classcv_1_1SparseOpticalFlow.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d08/classcv_1_1SparsePyrLKOpticalFlow.html">cv::SparsePyrLKOpticalFlow</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Class used for calculating a sparse optical flow.  <a href="../../d7/d08/classcv_1_1SparsePyrLKOpticalFlow.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d0a/classcv_1_1Tracker.html">cv::Tracker</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Base abstract class for the long-term tracker.  <a href="../../d0/d0a/classcv_1_1Tracker.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d4c/classcv_1_1TrackerGOTURN.html">cv::TrackerGOTURN</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">the GOTURN (Generic Object Tracking Using Regression Networks) tracker  <a href="../../d7/d4c/classcv_1_1TrackerGOTURN.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d26/classcv_1_1TrackerMIL.html">cv::TrackerMIL</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The MIL algorithm trains a classifier in an online manner to separate the object from the background.  <a href="../../d0/d26/classcv_1_1TrackerMIL.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d4b/classcv_1_1VariationalRefinement.html">cv::VariationalRefinement</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Variational optical flow refinement.  <a href="../../d2/d4b/classcv_1_1VariationalRefinement.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga1d74616b51e7bc4f312a6978690c98b4"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/>
  <a class="el" href="../../dc/d6b/group__video__track.html#gga1d74616b51e7bc4f312a6978690c98b4a9d4430ac75199af0cf6fcdefba30eafe">cv::OPTFLOW_USE_INITIAL_FLOW</a> = 4, 
<br/>
  <a class="el" href="../../dc/d6b/group__video__track.html#gga1d74616b51e7bc4f312a6978690c98b4add75f0bd85d1bd739b39b8900bc12c58">cv::OPTFLOW_LK_GET_MIN_EIGENVALS</a> = 8, 
<br/>
  <a class="el" href="../../dc/d6b/group__video__track.html#gga1d74616b51e7bc4f312a6978690c98b4a4ffe37adbc548e44a61025a26a1914aa">cv::OPTFLOW_FARNEBACK_GAUSSIAN</a> = 256
<br/>
 }</td></tr>
<tr class="separator:ga1d74616b51e7bc4f312a6978690c98b4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaaedb1f94e6b143cef163622c531afd88"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/>
  <a class="el" href="../../dc/d6b/group__video__track.html#ggaaedb1f94e6b143cef163622c531afd88a01106d6d20122b782ff25eaeffe9a5be">cv::MOTION_TRANSLATION</a> = 0, 
<br/>
  <a class="el" href="../../dc/d6b/group__video__track.html#ggaaedb1f94e6b143cef163622c531afd88a075fb2a93001cb4cc1ba1b22af1e8848">cv::MOTION_EUCLIDEAN</a> = 1, 
<br/>
  <a class="el" href="../../dc/d6b/group__video__track.html#ggaaedb1f94e6b143cef163622c531afd88aa22eb135b6afe090a8a0d228fd62634a">cv::MOTION_AFFINE</a> = 2, 
<br/>
  <a class="el" href="../../dc/d6b/group__video__track.html#ggaaedb1f94e6b143cef163622c531afd88a81a5e999a7fde5656ce1ca0458741b27">cv::MOTION_HOMOGRAPHY</a> = 3
<br/>
 }</td></tr>
<tr class="separator:gaaedb1f94e6b143cef163622c531afd88"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga86640c1c470f87b2660c096d2b22b2ce"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#ga86640c1c470f87b2660c096d2b22b2ce">cv::buildOpticalFlowPyramid</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> img, <a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> pyramid, <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> winSize, int maxLevel, bool withDerivatives=true, int pyrBorder=<a class="el" href="../../d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5ab3c5a6143d8120b95005fa7105a10bb4">BORDER_REFLECT_101</a>, int derivBorder=<a class="el" href="../../d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5aed2e4346047e265c8c5a6d0276dcd838">BORDER_CONSTANT</a>, bool tryReuseInputImage=true)</td></tr>
<tr class="memdesc:ga86640c1c470f87b2660c096d2b22b2ce"><td class="mdescLeft"> </td><td class="mdescRight">Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK.  <a href="../../dc/d6b/group__video__track.html#ga86640c1c470f87b2660c096d2b22b2ce">More...</a><br/></td></tr>
<tr class="separator:ga86640c1c470f87b2660c096d2b22b2ce"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5d10ebbd59fe09c5f650289ec0ece5af"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#ga5d10ebbd59fe09c5f650289ec0ece5af">cv::calcOpticalFlowFarneback</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> prev, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> next, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags)</td></tr>
<tr class="memdesc:ga5d10ebbd59fe09c5f650289ec0ece5af"><td class="mdescLeft"> </td><td class="mdescRight">Computes a dense optical flow using the Gunnar Farneback's algorithm.  <a href="../../dc/d6b/group__video__track.html#ga5d10ebbd59fe09c5f650289ec0ece5af">More...</a><br/></td></tr>
<tr class="separator:ga5d10ebbd59fe09c5f650289ec0ece5af"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga473e4b886d0bcc6b65831eb88ed93323"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#ga473e4b886d0bcc6b65831eb88ed93323">cv::calcOpticalFlowPyrLK</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> prevImg, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> nextImg, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> prevPts, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> nextPts, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> status, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> err, <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> winSize=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(21, 21), int maxLevel=3, <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> criteria=<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>+<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>, 30, 0.01), int flags=0, double minEigThreshold=1e-4)</td></tr>
<tr class="memdesc:ga473e4b886d0bcc6b65831eb88ed93323"><td class="mdescLeft"> </td><td class="mdescRight">Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids.  <a href="../../dc/d6b/group__video__track.html#ga473e4b886d0bcc6b65831eb88ed93323">More...</a><br/></td></tr>
<tr class="separator:ga473e4b886d0bcc6b65831eb88ed93323"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaef2bd39c8356f423124f1fe7c44d54a1"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#gaef2bd39c8356f423124f1fe7c44d54a1">cv::CamShift</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> probImage, <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &amp;window, <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> criteria)</td></tr>
<tr class="memdesc:gaef2bd39c8356f423124f1fe7c44d54a1"><td class="mdescLeft"> </td><td class="mdescRight">Finds an object center, size, and orientation.  <a href="../../dc/d6b/group__video__track.html#gaef2bd39c8356f423124f1fe7c44d54a1">More...</a><br/></td></tr>
<tr class="separator:gaef2bd39c8356f423124f1fe7c44d54a1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae94247c0014ff6497a3f85e60eab0a66"><td align="right" class="memItemLeft" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#gae94247c0014ff6497a3f85e60eab0a66">cv::computeECC</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> templateImage, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> inputImage, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> inputMask=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>())</td></tr>
<tr class="memdesc:gae94247c0014ff6497a3f85e60eab0a66"><td class="mdescLeft"> </td><td class="mdescRight">Computes the Enhanced Correlation Coefficient value between two images <a class="el" href="../../d0/de3/citelist.html#CITEREF_EP08">[67]</a> .  <a href="../../dc/d6b/group__video__track.html#gae94247c0014ff6497a3f85e60eab0a66">More...</a><br/></td></tr>
<tr class="separator:gae94247c0014ff6497a3f85e60eab0a66"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga762cbe5efd52cf078950196f3c616d48"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#ga762cbe5efd52cf078950196f3c616d48">cv::estimateRigidTransform</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> dst, bool fullAffine)</td></tr>
<tr class="memdesc:ga762cbe5efd52cf078950196f3c616d48"><td class="mdescLeft"> </td><td class="mdescRight">Computes an optimal affine transformation between two 2D point sets.  <a href="../../dc/d6b/group__video__track.html#ga762cbe5efd52cf078950196f3c616d48">More...</a><br/></td></tr>
<tr class="separator:ga762cbe5efd52cf078950196f3c616d48"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1aa357007eaec11e9ed03500ecbcbe47"><td align="right" class="memItemLeft" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#ga1aa357007eaec11e9ed03500ecbcbe47">cv::findTransformECC</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> templateImage, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> inputImage, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> warpMatrix, int motionType, <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> criteria, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> inputMask, int gaussFiltSize)</td></tr>
<tr class="memdesc:ga1aa357007eaec11e9ed03500ecbcbe47"><td class="mdescLeft"> </td><td class="mdescRight">Finds the geometric transform (warp) between two images in terms of the ECC criterion <a class="el" href="../../d0/de3/citelist.html#CITEREF_EP08">[67]</a> .  <a href="../../dc/d6b/group__video__track.html#ga1aa357007eaec11e9ed03500ecbcbe47">More...</a><br/></td></tr>
<tr class="separator:ga1aa357007eaec11e9ed03500ecbcbe47"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7ded46f9a55c0364c92ccd2019d43e3a"><td align="right" class="memItemLeft" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#ga7ded46f9a55c0364c92ccd2019d43e3a">cv::findTransformECC</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> templateImage, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> inputImage, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> warpMatrix, int motionType=<a class="el" href="../../dc/d6b/group__video__track.html#ggaaedb1f94e6b143cef163622c531afd88aa22eb135b6afe090a8a0d228fd62634a">MOTION_AFFINE</a>, <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> criteria=<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>+<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>, 50, 0.001), <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> inputMask=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>())</td></tr>
<tr class="separator:ga7ded46f9a55c0364c92ccd2019d43e3a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga432a563c94eaf179533ff1e83dbb65ea"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#ga432a563c94eaf179533ff1e83dbb65ea">cv::meanShift</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> probImage, <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &amp;window, <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> criteria)</td></tr>
<tr class="memdesc:ga432a563c94eaf179533ff1e83dbb65ea"><td class="mdescLeft"> </td><td class="mdescRight">Finds an object on a back projection image.  <a href="../../dc/d6b/group__video__track.html#ga432a563c94eaf179533ff1e83dbb65ea">More...</a><br/></td></tr>
<tr class="separator:ga432a563c94eaf179533ff1e83dbb65ea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga957e09bfbb6c68af6d5a6c1b3312bf88"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#ga957e09bfbb6c68af6d5a6c1b3312bf88">cv::readOpticalFlow</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;path)</td></tr>
<tr class="memdesc:ga957e09bfbb6c68af6d5a6c1b3312bf88"><td class="mdescLeft"> </td><td class="mdescRight">Read a .flo file.  <a href="../../dc/d6b/group__video__track.html#ga957e09bfbb6c68af6d5a6c1b3312bf88">More...</a><br/></td></tr>
<tr class="separator:ga957e09bfbb6c68af6d5a6c1b3312bf88"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad6e34461a92d7716d581567e8b06a550"><td align="right" class="memItemLeft" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d6b/group__video__track.html#gad6e34461a92d7716d581567e8b06a550">cv::writeOpticalFlow</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;path, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> flow)</td></tr>
<tr class="memdesc:gad6e34461a92d7716d581567e8b06a550"><td class="mdescLeft"> </td><td class="mdescRight">Write a .flo to disk.  <a href="../../dc/d6b/group__video__track.html#gad6e34461a92d7716d581567e8b06a550">More...</a><br/></td></tr>
<tr class="separator:gad6e34461a92d7716d581567e8b06a550"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga1d74616b51e7bc4f312a6978690c98b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1d74616b51e7bc4f312a6978690c98b4">◆ </a></span>anonymous enum</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga1d74616b51e7bc4f312a6978690c98b4a9d4430ac75199af0cf6fcdefba30eafe"></a>OPTFLOW_USE_INITIAL_FLOW <div class="python_language">Python: cv.OPTFLOW_USE_INITIAL_FLOW</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga1d74616b51e7bc4f312a6978690c98b4add75f0bd85d1bd739b39b8900bc12c58"></a>OPTFLOW_LK_GET_MIN_EIGENVALS <div class="python_language">Python: cv.OPTFLOW_LK_GET_MIN_EIGENVALS</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga1d74616b51e7bc4f312a6978690c98b4a4ffe37adbc548e44a61025a26a1914aa"></a>OPTFLOW_FARNEBACK_GAUSSIAN <div class="python_language">Python: cv.OPTFLOW_FARNEBACK_GAUSSIAN</div></td><td class="fielddoc"></td></tr>
</table>
</div>
</div>
<a id="gaaedb1f94e6b143cef163622c531afd88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaedb1f94e6b143cef163622c531afd88">◆ </a></span>anonymous enum</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggaaedb1f94e6b143cef163622c531afd88a01106d6d20122b782ff25eaeffe9a5be"></a>MOTION_TRANSLATION <div class="python_language">Python: cv.MOTION_TRANSLATION</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaaedb1f94e6b143cef163622c531afd88a075fb2a93001cb4cc1ba1b22af1e8848"></a>MOTION_EUCLIDEAN <div class="python_language">Python: cv.MOTION_EUCLIDEAN</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaaedb1f94e6b143cef163622c531afd88aa22eb135b6afe090a8a0d228fd62634a"></a>MOTION_AFFINE <div class="python_language">Python: cv.MOTION_AFFINE</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ggaaedb1f94e6b143cef163622c531afd88a81a5e999a7fde5656ce1ca0458741b27"></a>MOTION_HOMOGRAPHY <div class="python_language">Python: cv.MOTION_HOMOGRAPHY</div></td><td class="fielddoc"></td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga86640c1c470f87b2660c096d2b22b2ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga86640c1c470f87b2660c096d2b22b2ce">◆ </a></span>buildOpticalFlowPyramid()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::buildOpticalFlowPyramid </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> </td>
          <td class="paramname"><em>pyramid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> </td>
          <td class="paramname"><em>winSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>maxLevel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>withDerivatives</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>pyrBorder</em> = <code><a class="el" href="../../d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5ab3c5a6143d8120b95005fa7105a10bb4">BORDER_REFLECT_101</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>derivBorder</em> = <code><a class="el" href="../../d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5aed2e4346047e265c8c5a6d0276dcd838">BORDER_CONSTANT</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>tryReuseInputImage</em> = <code>true</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, pyramid</td><td>=</td><td>cv.buildOpticalFlowPyramid(</td><td class="paramname">img, winSize, maxLevel[, pyramid[, withDerivatives[, pyrBorder[, derivBorder[, tryReuseInputImage]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>Constructs the image pyramid which can be passed to calcOpticalFlowPyrLK. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>8-bit input image. </td></tr>
    <tr><td class="paramname">pyramid</td><td>output pyramid. </td></tr>
    <tr><td class="paramname">winSize</td><td>window size of optical flow algorithm. Must be not less than winSize argument of calcOpticalFlowPyrLK. It is needed to calculate required padding for pyramid levels. </td></tr>
    <tr><td class="paramname">maxLevel</td><td>0-based maximal pyramid level number. </td></tr>
    <tr><td class="paramname">withDerivatives</td><td>set to precompute gradients for the every pyramid level. If pyramid is constructed without the gradients then calcOpticalFlowPyrLK will calculate them internally. </td></tr>
    <tr><td class="paramname">pyrBorder</td><td>the border mode for pyramid layers. </td></tr>
    <tr><td class="paramname">derivBorder</td><td>the border mode for gradients. </td></tr>
    <tr><td class="paramname">tryReuseInputImage</td><td>put ROI of input image into the pyramid if possible. You can pass false to force data copying. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of levels in constructed pyramid. Can be less than maxLevel. </dd></dl>
</div>
</div>
<a id="ga5d10ebbd59fe09c5f650289ec0ece5af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5d10ebbd59fe09c5f650289ec0ece5af">◆ </a></span>calcOpticalFlowFarneback()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::calcOpticalFlowFarneback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>prev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>next</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>flow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>pyr_scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>levels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>winsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>iterations</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>poly_n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>poly_sigma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>flags</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>flow</td><td>=</td><td>cv.calcOpticalFlowFarneback(</td><td class="paramname">prev, next, flow, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>Computes a dense optical flow using the Gunnar Farneback's algorithm. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">prev</td><td>first 8-bit single-channel input image. </td></tr>
    <tr><td class="paramname">next</td><td>second input image of the same size and the same type as prev. </td></tr>
    <tr><td class="paramname">flow</td><td>computed flow image that has the same size as prev and type CV_32FC2. </td></tr>
    <tr><td class="paramname">pyr_scale</td><td>parameter, specifying the image scale (&lt;1) to build pyramids for each image; pyr_scale=0.5 means a classical pyramid, where each next layer is twice smaller than the previous one. </td></tr>
    <tr><td class="paramname">levels</td><td>number of pyramid layers including the initial image; levels=1 means that no extra layers are created and only the original images are used. </td></tr>
    <tr><td class="paramname">winsize</td><td>averaging window size; larger values increase the algorithm robustness to image noise and give more chances for fast motion detection, but yield more blurred motion field. </td></tr>
    <tr><td class="paramname">iterations</td><td>number of iterations the algorithm does at each pyramid level. </td></tr>
    <tr><td class="paramname">poly_n</td><td>size of the pixel neighborhood used to find polynomial expansion in each pixel; larger values mean that the image will be approximated with smoother surfaces, yielding more robust algorithm and more blurred motion field, typically poly_n =5 or 7. </td></tr>
    <tr><td class="paramname">poly_sigma</td><td>standard deviation of the Gaussian that is used to smooth derivatives used as a basis for the polynomial expansion; for poly_n=5, you can set poly_sigma=1.1, for poly_n=7, a good value would be poly_sigma=1.5. </td></tr>
    <tr><td class="paramname">flags</td><td>operation flags that can be a combination of the following:<ul>
<li><b>OPTFLOW_USE_INITIAL_FLOW</b> uses the input flow as an initial flow approximation.</li>
<li><b>OPTFLOW_FARNEBACK_GAUSSIAN</b> uses the Gaussian \(\texttt{winsize}\times\texttt{winsize}\) filter instead of a box filter of the same size for optical flow estimation; usually, this option gives z more accurate flow than with a box filter, at the cost of lower speed; normally, winsize for a Gaussian window should be set to a larger value to achieve the same level of robustness.</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<p>The function finds an optical flow for each prev pixel using the <a class="el" href="../../d0/de3/citelist.html#CITEREF_Farneback2003">[69]</a> algorithm so that</p>
<p class="formulaDsp">
\[\texttt{prev} (y,x) \sim \texttt{next} ( y + \texttt{flow} (y,x)[1], x + \texttt{flow} (y,x)[0])\]
</p>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<ul>
<li>An example using the optical flow algorithm described by Gunnar Farneback can be found at opencv_source_code/samples/cpp/fback.cpp</li>
<li>(Python) An example using the optical flow algorithm described by Gunnar Farneback can be found at opencv_source_code/samples/python/opt_flow.py </li>
</ul>
</div>
</div>
<a id="ga473e4b886d0bcc6b65831eb88ed93323"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga473e4b886d0bcc6b65831eb88ed93323">◆ </a></span>calcOpticalFlowPyrLK()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::calcOpticalFlowPyrLK </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>prevImg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>nextImg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>prevPts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>nextPts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>status</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>err</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> </td>
          <td class="paramname"><em>winSize</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(21, 21)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>maxLevel</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> </td>
          <td class="paramname"><em>criteria</em> = <code><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>+<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>, 30, 0.01)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>flags</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>minEigThreshold</em> = <code>1e-4</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>nextPts, status, err</td><td>=</td><td>cv.calcOpticalFlowPyrLK(</td><td class="paramname">prevImg, nextImg, prevPts, nextPts[, status[, err[, winSize[, maxLevel[, criteria[, flags[, minEigThreshold]]]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">prevImg</td><td>first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid. </td></tr>
    <tr><td class="paramname">nextImg</td><td>second input image or pyramid of the same size and the same type as prevImg. </td></tr>
    <tr><td class="paramname">prevPts</td><td>vector of 2D points for which the flow needs to be found; point coordinates must be single-precision floating-point numbers. </td></tr>
    <tr><td class="paramname">nextPts</td><td>output vector of 2D points (with single-precision floating-point coordinates) containing the calculated new positions of input features in the second image; when OPTFLOW_USE_INITIAL_FLOW flag is passed, the vector must have the same size as in the input. </td></tr>
    <tr><td class="paramname">status</td><td>output status vector (of unsigned chars); each element of the vector is set to 1 if the flow for the corresponding features has been found, otherwise, it is set to 0. </td></tr>
    <tr><td class="paramname">err</td><td>output vector of errors; each element of the vector is set to an error for the corresponding feature, type of the error measure can be set in flags parameter; if the flow wasn't found then the error is not defined (use the status parameter to find such cases). </td></tr>
    <tr><td class="paramname">winSize</td><td>size of the search window at each pyramid level. </td></tr>
    <tr><td class="paramname">maxLevel</td><td>0-based maximal pyramid level number; if set to 0, pyramids are not used (single level), if set to 1, two levels are used, and so on; if pyramids are passed to input then algorithm will use as many levels as pyramids have but no more than maxLevel. </td></tr>
    <tr><td class="paramname">criteria</td><td>parameter, specifying the termination criteria of the iterative search algorithm (after the specified maximum number of iterations criteria.maxCount or when the search window moves by less than criteria.epsilon. </td></tr>
    <tr><td class="paramname">flags</td><td>operation flags:<ul>
<li><b>OPTFLOW_USE_INITIAL_FLOW</b> uses initial estimations, stored in nextPts; if the flag is not set, then prevPts is copied to nextPts and is considered the initial estimate.</li>
<li><b>OPTFLOW_LK_GET_MIN_EIGENVALS</b> use minimum eigen values as an error measure (see minEigThreshold description); if the flag is not set, then <a class="el" href="../../d4/d7f/structcv_1_1L1.html">L1</a> distance between patches around the original and a moved point, divided by number of pixels in a window, is used as a error measure. </li>
</ul>
</td></tr>
    <tr><td class="paramname">minEigThreshold</td><td>the algorithm calculates the minimum eigen value of a 2x2 normal matrix of optical flow equations (this matrix is called a spatial gradient matrix in <a class="el" href="../../d0/de3/citelist.html#CITEREF_Bouguet00">[30]</a>), divided by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding feature is filtered out and its flow is not processed, so it allows to remove bad points and get a performance boost.</td></tr>
  </table>
  </dd>
</dl>
<p>The function implements a sparse iterative version of the Lucas-Kanade optical flow in pyramids. See <a class="el" href="../../d0/de3/citelist.html#CITEREF_Bouguet00">[30]</a> . The function is parallelized with the TBB library.</p>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<ul>
<li>An example using the Lucas-Kanade optical flow algorithm can be found at opencv_source_code/samples/cpp/lkdemo.cpp</li>
<li>(Python) An example using the Lucas-Kanade optical flow algorithm can be found at opencv_source_code/samples/python/lk_track.py</li>
<li>(Python) An example using the Lucas-Kanade tracker for homography matching can be found at opencv_source_code/samples/python/lk_homography.py </li>
</ul>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d2/d1d/samples_2cpp_2lkdemo_8cpp-example.html#a24">samples/cpp/lkdemo.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gaef2bd39c8356f423124f1fe7c44d54a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaef2bd39c8356f423124f1fe7c44d54a1">◆ </a></span>CamShift()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> cv::CamShift </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>probImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &amp; </td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> </td>
          <td class="paramname"><em>criteria</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, window</td><td>=</td><td>cv.CamShift(</td><td class="paramname">probImage, window, criteria</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>Finds an object center, size, and orientation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">probImage</td><td>Back projection of the object histogram. See calcBackProject. </td></tr>
    <tr><td class="paramname">window</td><td>Initial search window. </td></tr>
    <tr><td class="paramname">criteria</td><td>Stop criteria for the underlying meanShift. returns (in old interfaces) Number of iterations CAMSHIFT took to converge The function implements the CAMSHIFT object tracking algorithm <a class="el" href="../../d0/de3/citelist.html#CITEREF_Bradski98">[33]</a> . First, it finds an object center using meanShift and then adjusts the window size and finds the optimal rotation. The function returns the rotated rectangle structure that includes the object position, size, and orientation. The next position of the search window can be obtained with <a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html#a055a5d35e50bce65e3b1dee318dd3044" title="returns the minimal up-right integer rectangle containing the rotated rectangle ">RotatedRect::boundingRect()</a></td></tr>
  </table>
  </dd>
</dl>
<p>See the OpenCV sample camshiftdemo.c that tracks colored objects.</p>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>(Python) A sample explaining the camshift tracking algorithm can be found at opencv_source_code/samples/python/camshift.py </li>
</ul>
</dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a54">samples/cpp/camshiftdemo.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="gae94247c0014ff6497a3f85e60eab0a66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae94247c0014ff6497a3f85e60eab0a66">◆ </a></span>computeECC()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::computeECC </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>templateImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>inputImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>inputMask</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.computeECC(</td><td class="paramname">templateImage, inputImage[, inputMask]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>Computes the Enhanced Correlation Coefficient value between two images <a class="el" href="../../d0/de3/citelist.html#CITEREF_EP08">[67]</a> . </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">templateImage</td><td>single-channel template image; CV_8U or CV_32F array. </td></tr>
    <tr><td class="paramname">inputImage</td><td>single-channel input image to be warped to provide an image similar to templateImage, same type as templateImage. </td></tr>
    <tr><td class="paramname">inputMask</td><td>An optional mask to indicate valid values of inputImage.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../dc/d6b/group__video__track.html#ga1aa357007eaec11e9ed03500ecbcbe47" title="Finds the geometric transform (warp) between two images in terms of the ECC criterion  ...">findTransformECC</a> </dd></dl>
</div>
</div>
<a id="ga762cbe5efd52cf078950196f3c616d48"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga762cbe5efd52cf078950196f3c616d48">◆ </a></span>estimateRigidTransform()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::estimateRigidTransform </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>fullAffine</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>Computes an optimal affine transformation between two 2D point sets. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>First input 2D point set stored in std::vector or <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a>, or an image stored in <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a>. </td></tr>
    <tr><td class="paramname">dst</td><td>Second input 2D point set of the same size and the same type as A, or another image. </td></tr>
    <tr><td class="paramname">fullAffine</td><td>If true, the function finds an optimal affine transformation with no additional restrictions (6 degrees of freedom). Otherwise, the class of transformations to choose from is limited to combinations of translation, rotation, and uniform scaling (4 degrees of freedom).</td></tr>
  </table>
  </dd>
</dl>
<p>The function finds an optimal affine transform <em>[A|b]</em> (a 2 x 3 floating-point matrix) that approximates best the affine transformation between: </p><pre class="fragment">Two point sets
Two raster images. In this case, the function first finds some features in the src image and
finds the corresponding features in dst image. After that, the problem is reduced to the first
case.
</pre><p> In case of point sets, the problem is formulated as follows: you need to find a 2x2 matrix <em>A</em> and 2x1 vector <em>b</em> so that:</p>
<p class="formulaDsp">
\[[A^*|b^*] = arg \min _{[A|b]} \sum _i \| \texttt{dst}[i] - A { \texttt{src}[i]}^T - b \| ^2\]
</p>
<p> where src[i] and dst[i] are the i-th points in src and dst, respectively \([A|b]\) can be either arbitrary (when fullAffine=true ) or have a form of </p><p class="formulaDsp">
\[\begin{bmatrix} a_{11} &amp; a_{12} &amp; b_1 \\ -a_{12} &amp; a_{11} &amp; b_2 \end{bmatrix}\]
</p>
<p> when fullAffine=false.</p>
<dl class="deprecated"><dt><b><a class="el" href="../../da/d58/deprecated.html#_deprecated000040">Deprecated:</a></b></dt><dd>Use <a class="el" href="../../d9/d0c/group__calib3d.html#ga27865b1d26bac9ce91efaee83e94d4dd" title="Computes an optimal affine transformation between two 2D point sets. ">cv::estimateAffine2D</a>, <a class="el" href="../../d9/d0c/group__calib3d.html#gad767faff73e9cbd8b9d92b955b50062d" title="Computes an optimal limited affine transformation with 4 degrees of freedom between two 2D point sets...">cv::estimateAffinePartial2D</a> instead. If you are using this function with images, extract points using <a class="el" href="../../dc/d6b/group__video__track.html#ga473e4b886d0bcc6b65831eb88ed93323" title="Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyra...">cv::calcOpticalFlowPyrLK</a> and then use the estimation functions.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d9/d0c/group__calib3d.html#ga27865b1d26bac9ce91efaee83e94d4dd" title="Computes an optimal affine transformation between two 2D point sets. ">estimateAffine2D</a>, <a class="el" href="../../d9/d0c/group__calib3d.html#gad767faff73e9cbd8b9d92b955b50062d" title="Computes an optimal limited affine transformation with 4 degrees of freedom between two 2D point sets...">estimateAffinePartial2D</a>, <a class="el" href="../../da/d54/group__imgproc__transform.html#ga8f6d378f9f8eebb5cb55cd3ae295a999" title="Calculates an affine transform from three pairs of the corresponding points. ">getAffineTransform</a>, <a class="el" href="../../da/d54/group__imgproc__transform.html#ga20f62aa3235d869c9956436c870893ae" title="Calculates a perspective transform from four pairs of the corresponding points. ">getPerspectiveTransform</a>, <a class="el" href="../../d9/d0c/group__calib3d.html#ga4abc2ece9fab9398f2e560d53c8c9780" title="Finds a perspective transformation between two planes. ">findHomography</a> </dd></dl>
</div>
</div>
<a id="ga1aa357007eaec11e9ed03500ecbcbe47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1aa357007eaec11e9ed03500ecbcbe47">◆ </a></span>findTransformECC() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::findTransformECC </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>templateImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>inputImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>warpMatrix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>motionType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> </td>
          <td class="paramname"><em>criteria</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>inputMask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>gaussFiltSize</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, warpMatrix</td><td>=</td><td>cv.findTransformECC(</td><td class="paramname">templateImage, inputImage, warpMatrix, motionType, criteria, inputMask, gaussFiltSize</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval, warpMatrix</td><td>=</td><td>cv.findTransformECC(</td><td class="paramname">templateImage, inputImage, warpMatrix[, motionType[, criteria[, inputMask]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>Finds the geometric transform (warp) between two images in terms of the ECC criterion <a class="el" href="../../d0/de3/citelist.html#CITEREF_EP08">[67]</a> . </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">templateImage</td><td>single-channel template image; CV_8U or CV_32F array. </td></tr>
    <tr><td class="paramname">inputImage</td><td>single-channel input image which should be warped with the final warpMatrix in order to provide an image similar to templateImage, same type as templateImage. </td></tr>
    <tr><td class="paramname">warpMatrix</td><td>floating-point \(2\times 3\) or \(3\times 3\) mapping matrix (warp). </td></tr>
    <tr><td class="paramname">motionType</td><td>parameter, specifying the type of motion:<ul>
<li><b>MOTION_TRANSLATION</b> sets a translational motion model; warpMatrix is \(2\times 3\) with the first \(2\times 2\) part being the unity matrix and the rest two parameters being estimated.</li>
<li><b>MOTION_EUCLIDEAN</b> sets a Euclidean (rigid) transformation as motion model; three parameters are estimated; warpMatrix is \(2\times 3\).</li>
<li><b>MOTION_AFFINE</b> sets an affine motion model (DEFAULT); six parameters are estimated; warpMatrix is \(2\times 3\).</li>
<li><b>MOTION_HOMOGRAPHY</b> sets a homography as a motion model; eight parameters are estimated;`warpMatrix` is \(3\times 3\). </li>
</ul>
</td></tr>
    <tr><td class="paramname">criteria</td><td>parameter, specifying the termination criteria of the ECC algorithm; criteria.epsilon defines the threshold of the increment in the correlation coefficient between two iterations (a negative criteria.epsilon makes criteria.maxcount the only termination criterion). Default values are shown in the declaration above. </td></tr>
    <tr><td class="paramname">inputMask</td><td>An optional mask to indicate valid values of inputImage. </td></tr>
    <tr><td class="paramname">gaussFiltSize</td><td>An optional value indicating size of gaussian blur filter; (DEFAULT: 5)</td></tr>
  </table>
  </dd>
</dl>
<p>The function estimates the optimum transformation (warpMatrix) with respect to ECC criterion (<a class="el" href="../../d0/de3/citelist.html#CITEREF_EP08">[67]</a>), that is</p>
<p class="formulaDsp">
\[\texttt{warpMatrix} = \arg\max_{W} \texttt{ECC}(\texttt{templateImage}(x,y),\texttt{inputImage}(x',y'))\]
</p>
<p>where</p>
<p class="formulaDsp">
\[\begin{bmatrix} x' \\ y' \end{bmatrix} = W \cdot \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}\]
</p>
<p>(the equation holds with homogeneous coordinates for homography). It returns the final enhanced correlation coefficient, that is the correlation coefficient between the template image and the final warped input image. When a \(3\times 3\) matrix is given with motionType =0, 1 or 2, the third row is ignored.</p>
<p>Unlike findHomography and estimateRigidTransform, the function findTransformECC implements an area-based alignment that builds on intensity similarities. In essence, the function updates the initial transformation that roughly aligns the images. If this information is missing, the identity warp (unity matrix) is used as an initialization. Note that if images undergo strong displacements/rotations, an initial transformation that roughly aligns the images is necessary (e.g., a simple euclidean/similarity transform that allows for the images showing the same image content approximately). Use inverse warping in the second image to take an image close to the first one, i.e. use the flag WARP_INVERSE_MAP with warpAffine or warpPerspective. See also the OpenCV sample image_alignment.cpp that demonstrates the use of the function. Note that the function throws an exception if algorithm does not converges.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../dc/d6b/group__video__track.html#gae94247c0014ff6497a3f85e60eab0a66" title="Computes the Enhanced Correlation Coefficient value between two images  . ">computeECC</a>, <a class="el" href="../../d9/d0c/group__calib3d.html#ga27865b1d26bac9ce91efaee83e94d4dd" title="Computes an optimal affine transformation between two 2D point sets. ">estimateAffine2D</a>, <a class="el" href="../../d9/d0c/group__calib3d.html#gad767faff73e9cbd8b9d92b955b50062d" title="Computes an optimal limited affine transformation with 4 degrees of freedom between two 2D point sets...">estimateAffinePartial2D</a>, <a class="el" href="../../d9/d0c/group__calib3d.html#ga4abc2ece9fab9398f2e560d53c8c9780" title="Finds a perspective transformation between two planes. ">findHomography</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#a39">samples/cpp/image_alignment.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga7ded46f9a55c0364c92ccd2019d43e3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7ded46f9a55c0364c92ccd2019d43e3a">◆ </a></span>findTransformECC() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::findTransformECC </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>templateImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>inputImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>warpMatrix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>motionType</em> = <code><a class="el" href="../../dc/d6b/group__video__track.html#ggaaedb1f94e6b143cef163622c531afd88aa22eb135b6afe090a8a0d228fd62634a">MOTION_AFFINE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> </td>
          <td class="paramname"><em>criteria</em> = <code><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>+<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>, 50, 0.001)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>inputMask</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, warpMatrix</td><td>=</td><td>cv.findTransformECC(</td><td class="paramname">templateImage, inputImage, warpMatrix, motionType, criteria, inputMask, gaussFiltSize</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval, warpMatrix</td><td>=</td><td>cv.findTransformECC(</td><td class="paramname">templateImage, inputImage, warpMatrix[, motionType[, criteria[, inputMask]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="ga432a563c94eaf179533ff1e83dbb65ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga432a563c94eaf179533ff1e83dbb65ea">◆ </a></span>meanShift()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::meanShift </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>probImage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &amp; </td>
          <td class="paramname"><em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> </td>
          <td class="paramname"><em>criteria</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, window</td><td>=</td><td>cv.meanShift(</td><td class="paramname">probImage, window, criteria</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>Finds an object on a back projection image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">probImage</td><td>Back projection of the object histogram. See calcBackProject for details. </td></tr>
    <tr><td class="paramname">window</td><td>Initial search window. </td></tr>
    <tr><td class="paramname">criteria</td><td>Stop criteria for the iterative search algorithm. returns : Number of iterations CAMSHIFT took to converge. The function implements the iterative object search algorithm. It takes the input back projection of an object and the initial position. The mass center in window of the back projection image is computed and the search window center shifts to the mass center. The procedure is repeated until the specified number of iterations criteria.maxCount is done or until the window center shifts by less than criteria.epsilon. The algorithm is used inside CamShift and, unlike CamShift , the search window size or orientation do not change during the search. You can simply pass the output of calcBackProject to this function. But better results can be obtained if you pre-filter the back projection and remove the noise. For example, you can do this by retrieving connected components with findContours , throwing away contours with small area ( contourArea ), and rendering the remaining contours with drawContours. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga957e09bfbb6c68af6d5a6c1b3312bf88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga957e09bfbb6c68af6d5a6c1b3312bf88">◆ </a></span>readOpticalFlow()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::readOpticalFlow </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.readOpticalFlow(</td><td class="paramname">path</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>Read a .flo file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>Path to the file to be loaded</td></tr>
  </table>
  </dd>
</dl>
<p>The function readOpticalFlow loads a flow field from a file and returns it as a single matrix. Resulting <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> has a type CV_32FC2 - floating-point, 2-channel. First channel corresponds to the flow in the horizontal direction (u), second - vertical (v). </p>
</div>
</div>
<a id="gad6e34461a92d7716d581567e8b06a550"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad6e34461a92d7716d581567e8b06a550">◆ </a></span>writeOpticalFlow()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cv::writeOpticalFlow </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>flow</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.writeOpticalFlow(</td><td class="paramname">path, flow</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">opencv2/video/tracking.hpp</a>&gt;</code></p>
<p>Write a .flo to disk. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>Path to the file to be written </td></tr>
    <tr><td class="paramname">flow</td><td>Flow field to be stored</td></tr>
  </table>
  </dd>
</dl>
<p>The function stores a flow field in a file, returns true on success, false otherwise. The flow field must be a 2-channel, floating-point matrix (CV_32FC2). First channel corresponds to the flow in the horizontal direction (u), second - vertical (v). </p>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:40 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
